import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

import Home from "@/views/home/Home"
import Category from "@/views/category/Category"
import Shopping from "@/views/shopping/Shopping"
import Profile from "@/views/profile/Profile"

export default new Router({
  routes:[
    {
      path:"/",
      redirect:"/home"
    },
    {
      path:"/home",
      name:"home",
      meta:{
        title:"首页"
      },
      component:Home
    },
    {
      path:"/category",
      name:"category",
      meta:{
        title:"分类"
      },
      component:Category
    },
    {
      path:"/shopping",
      name:"shopping",
      meta:{
        title:"购物车"
      },
      component:Shopping
    },
    {
      path:"/profile",
      name:"profile",
      meta:{
        title:"我的"
      },
      component:Profile
    },
  ],
  mode:"history",
  linkActiveClass:"show"
})
